<?php
get_header();
?>
		<h2>Search results</h2>
		<p>There <?php if ($posts->total === 1) echo 'was'; else echo 'were'; ?> <?php echo $posts->total.' '.noun2plural('post', $posts->total); ?> found containing "<em><?php echo $s; ?></em>".</p>
<?php
if ($posts->total > 0) {
	foreach($posts->items as $post) {
?>
		<div<?php $post->css(); ?>>
			<h2><?php $post->the_permalink(); ?><span><?php $post->the_date('M. jS, \'y @ g:ia'); ?></span></h2>
			<?php $post->the_content(); ?>
			
			<p class="postmeta">by <?php $post->get_author_object()->the_permalink(); ?> in <?php $post->the_categories(); ?> &ndash; <?php $post->the_comment_link(true, array('text'=>$post->get_comment_amount())); ?></p>
		</div>
<?php } if ($posts->needsPagination()) { ?>
		<p class="pagination"><?php $posts->pagination(); ?></p>
<?php
	}
} else {
?>
		<h3>Search Again?</h3>
<?php
	search_form();
}

get_footer();
?>